import http from '@/utils/request'

// 获取地址列表
export const getAddressListApi = ()=> http.get('/address' )


// 新增地址
export const addAddressApi = (data)=>http.post('/address' ,data)

// 修改地址
export const updateAddressApi = (data)=>http.put('/address' , data)


// 根据id删除地址
export const deleteAddressByIdApi = (id)=>http.delete('/address/'+id)

// 根据id获取地址
export const getAddressByIdApi = (id)=>http.get('/address/'+id)

// 获取默认地址
export const getDefaultAddressApi = ()=>http.get('/address/default')